Optimal. Leaf size=150 \[ \frac {b \left (6 a^2+5 b^2\right ) \sin (c+d x)}{2 d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {(a+b)^2 (2 a+5 b) \log (1-\sin (c+d x))}{4 d}+\frac {(2 a-5 b) (a-b)^2 \log (\sin (c+d x)+1)}{4 d}+\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^3}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.24, antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2721, 1645, 1629, 633, 31} \[ \frac {b \left (6 a^2+5 b^2\right ) \sin (c+d x)}{2 d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {(a+b)^2 (2 a+5 b) \log (1-\sin (c+d x))}{4 d}+\frac {(2 a-5 b) (a-b)^2 \log (\sin (c+d x)+1)}{4 d}+\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^3}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 633
Rule 1629
Rule 1645
Rule 2721
Rubi steps
\begin {align*} \int (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^3 (a+x)^3}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^3}{2 d}+\frac {\operatorname {Subst}\left (\int \frac {(a+x)^2 \left (-3 b^4-2 a b^2 x-2 b^2 x^2\right )}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{2 b^2 d}\\ &=\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^3}{2 d}+\frac {\operatorname {Subst}\left (\int \left (6 a^2 b^2+5 b^4+6 a b^2 x+2 b^2 x^2-\frac {9 a^2 b^4+5 b^6+2 a b^2 \left (a^2+6 b^2\right ) x}{b^2-x^2}\right ) \, dx,x,b \sin (c+d x)\right )}{2 b^2 d}\\ &=\frac {b \left (6 a^2+5 b^2\right ) \sin (c+d x)}{2 d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^3}{2 d}-\frac {\operatorname {Subst}\left (\int \frac {9 a^2 b^4+5 b^6+2 a b^2 \left (a^2+6 b^2\right ) x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{2 b^2 d}\\ &=\frac {b \left (6 a^2+5 b^2\right ) \sin (c+d x)}{2 d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^3}{2 d}-\frac {\left ((2 a-5 b) (a-b)^2\right ) \operatorname {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{4 d}-\frac {\left ((a+b)^2 (2 a+5 b)\right ) \operatorname {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {(a+b)^2 (2 a+5 b) \log (1-\sin (c+d x))}{4 d}+\frac {(2 a-5 b) (a-b)^2 \log (1+\sin (c+d x))}{4 d}+\frac {b \left (6 a^2+5 b^2\right ) \sin (c+d x)}{2 d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^3}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.25, size = 141, normalized size = 0.94 \[ \frac {12 b \left (3 a^2+2 b^2\right ) \sin (c+d x)+18 a b^2 \sin ^2(c+d x)+\frac {3 (a-b)^3}{\sin (c+d x)+1}-\frac {3 (a+b)^3}{\sin (c+d x)-1}+3 (2 a-5 b) (a-b)^2 \log (\sin (c+d x)+1)+3 (a+b)^2 (2 a+5 b) \log (1-\sin (c+d x))+4 b^3 \sin ^3(c+d x)}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 194, normalized size = 1.29 \[ -\frac {18 \, a b^{2} \cos \left (d x + c\right )^{4} - 9 \, a b^{2} \cos \left (d x + c\right )^{2} - 3 \, {\left (2 \, a^{3} - 9 \, a^{2} b + 12 \, a b^{2} - 5 \, b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (2 \, a^{3} + 9 \, a^{2} b + 12 \, a b^{2} + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 6 \, a^{3} - 18 \, a b^{2} + 2 \, {\left (2 \, b^{3} \cos \left (d x + c\right )^{4} - 9 \, a^{2} b - 3 \, b^{3} - 2 \, {\left (9 \, a^{2} b + 7 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{12 \, d \cos \left (d x + c\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.16, size = 279, normalized size = 1.86 \[ \frac {a^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}+\frac {a^{3} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b \left (\sin ^{5}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}+\frac {3 a^{2} b \left (\sin ^{3}\left (d x +c \right )\right )}{2 d}+\frac {9 a^{2} b \sin \left (d x +c \right )}{2 d}-\frac {9 a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {3 a \,b^{2} \left (\sin ^{6}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}+\frac {3 a \,b^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{2 d}+\frac {3 a \,b^{2} \left (\sin ^{2}\left (d x +c \right )\right )}{d}+\frac {6 a \,b^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {b^{3} \left (\sin ^{7}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}+\frac {b^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{2 d}+\frac {5 b^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{6 d}+\frac {5 b^{3} \sin \left (d x +c \right )}{2 d}-\frac {5 b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 162, normalized size = 1.08 \[ \frac {4 \, b^{3} \sin \left (d x + c\right )^{3} + 18 \, a b^{2} \sin \left (d x + c\right )^{2} + 3 \, {\left (2 \, a^{3} - 9 \, a^{2} b + 12 \, a b^{2} - 5 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (2 \, a^{3} + 9 \, a^{2} b + 12 \, a b^{2} + 5 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 12 \, {\left (3 \, a^{2} b + 2 \, b^{3}\right )} \sin \left (d x + c\right ) - \frac {6 \, {\left (a^{3} + 3 \, a b^{2} + {\left (3 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{2} - 1}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.98, size = 366, normalized size = 2.44 \[ \frac {\left (9\,a^2\,b+5\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (2\,a^3+12\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\left (12\,a^2\,b+\frac {20\,b^3}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (6\,a^3+12\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (6\,a^2\,b-\frac {22\,b^3}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (6\,a^3+12\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (12\,a^2\,b+\frac {20\,b^3}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,a^3+12\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\left (9\,a^2\,b+5\,b^3\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^3+6\,a\,b^2\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,{\left (a-b\right )}^2\,\left (a-\frac {5\,b}{2}\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left (a+b\right )}^2\,\left (a+\frac {5\,b}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (c + d x \right )}\right )^{3} \tan ^{3}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________